package com.fita.entity.order;

import com.demo2do.core.utils.Alias;
/**
 * 
 * @author 宋剑宏
 *
 */
@Alias("OrderStatus")
public enum OrderStatus {
    
    CREATED("created", "已创建"),
    
    STAYING("staying","保留预定"),
    
    UNPAID("unpaid","待支付"),
     
    PAID("paid","已支付"),
    
    UNREFUNDED("unrefunded", "待退款"),
    
    CANCELED("canceled","已取消"),
    
    CONSUMED("consumed","已核销");
	
	private String alias; 
	
    private String description;

	/**
	 * @param alias
	 * @param description
	 */
	private OrderStatus(String alias, String description) {
		this.alias = alias;
		this.description = description;
	}

	/**
	 * @return the alias
	 */
	public String getAlias() {
		return alias;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	
	public boolean isStaying() {
		return this.equals(STAYING);
	}
	
	public boolean isUnpaid() {
		return this.equals(UNPAID);
	}
	
	public boolean isPaid() {
		return this.equals(PAID);
	}
	
	public boolean isCanceled() {
		return this.equals(CANCELED);
	}
	
	public boolean isConsumed() {
		return this.equals(CONSUMED);
	}
	
	public boolean isUnRefunded() {
	    return this.equals(UNREFUNDED);
	}
}
